import api from '@/utils/http.js'

// 分页查询帖子
export const postSelectPage = async (params) => {
  return await api.get('/selectForumInfo/page', { params })
}

// 新增帖子
export const postInsertOne = async (data) => {
  return await api.post('/insetForumInfo', data)
}

// 修改帖子
export const postUpdateOne = async (data) => {
  return await api.put('/updateForumInfo', data)
}

// 删除帖子
export const postDeleteOne = async (id) => {
  return await api.delete('/deleteForumInfo/' + id)
}

// 获取帖子评论
export const postCommentSelectList = async (data) => {
  return await api.get('/selectForumReply', { params: data })
}

// 删除帖子评论
export const postCommentDeleteOne = async (id) => {
  return await api.delete('/deleteForumReply/' + id)
}
